import Vue from 'vue'
import App from './App.vue'
//引入路由
import router from '@/router';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

//三级联动的组件---全局组件
//src\views\Home\TypeNav
import TypeNav from '@/components/TypeNav'
import "swiper/css/swiper.css"
import Carousel from '@/components/Carousel'
Vue.component(TypeNav.name,TypeNav)
Vue.component(Carousel.name,Carousel)
Vue.use(ElementUI)

//引入仓库
import store from '@/store/index'

//引入MockServer.js---mock数据
import '@/mock/mockServe'

new Vue({
  render: h => h(App),
  //全局事件总线;
  beforeCreate(){
    Vue.prototype.$bus = this;
  },
  //注册路由  地下的写法KV一致省略V【route小写的】
  router,
  //注册仓库：组件实例身上会多了一个属性store
  store
}).$mount('#app')
